<template>
  <div class="flex items-center mb-8 gap-4 mx-10">
    <button 
      class="border-none rounded-full w-10 h-10 flex items-center justify-center cursor-pointer transition-colors duration-200" 
      @click="$emit('back')"
    >
      <BackIcon :size="20" class="text-white" />
    </button>
    <div class="flex-1 flex justify-center">
      <div class="w-[80%] h-10 bg-black border border-white/20 rounded-full overflow-hidden relative">
        <div class="h-full bg-white rounded-full" :style="{ width: `${progress}%` }"></div>
        <span class="text-xl font-bold text-black absolute left-4 top-1/2 transform -translate-y-1/2">{{ progressText }}</span>
      </div>
    </div>
  </div>
</template>

<script setup>
import BackIcon from '@/components/icons/BackIcon.vue';

defineProps({
  progress: {
    type: Number,
    required: true
  },
  progressText: {
    type: String,
    required: true
  }
});

defineEmits(['back']);
</script>

<style scoped>
/* 进度条样式 */
.bg-white {
  background: white;
  transition: width 0.5s ease-out;
}

.rounded-full {
  border-radius: 999px;
}
</style> 